package com.glorysoft.hlgdpda.bindingadapter

import android.view.View
import android.widget.EditText
import androidx.databinding.BindingAdapter
import com.glorysoft.hlgdpda.customview.ListLinearLayout
import com.pda.platform.ui.ui_pdaplatform.utils_public.FreeApi_EditTextUtils

/**
 * FileName: TabIndexGridAdapter
 * Author: XJH
 * Date: 2021/5/13 17:46
 * Description:
 * History:
 */
object EditTextNextAdapter {

    @BindingAdapter(value = ["nextAction"], requireAll = false)
    @JvmStatic
    fun setNextAction(editText: EditText,ss : String) {
        FreeApi_EditTextUtils.setEditTextListener(editText, editText.context) { s: String ->
            val v = editText.focusSearch(View.FOCUS_DOWN)
            if (v != null) {
                check(v.requestFocus(View.FOCUS_DOWN)) {
                    ("focus search returned a view "
                            + "that wasn't able to take focus!")
                }
            }
        }

    }

}